1. Field of the Invention
The present invention relates to a printer that operates in response to data and control commands received from a host computer, and relates to a control method for such printer. More particularly, our invention relates to such a printer and a method for controlling the printer when the printer is off-line.
2. Description of the Related Art
Printers connected to a host computer receive data, including control commands, from the host and operate to print as instructed by the received control commands. Received data is temporarily stored in a first-in, first-out (FIFO) receive buffer, and sequentially interpreted therefrom by the analyzer section of the CPU. The printer then performs a printing process according to interpreted control command content.
Real-time commands can be contained in the received data. Real-time commands are control commands that are run immediately upon receipt by the printer without being stored to the receive buffer. When a real-time command is received, the printer inserts the real-time command at the front of the command queue for immediate execution before other stored commands. Real-time commands include, for example, a command to return information about the printer status to the host, and commands for recovering the printer from recoverable errors. These commands can be performed by the printer even when an error has occurred and the printer is off-line.
Printers of this type are normally either off-line or on-line. When on-line, data received from the host computer is stored to the receive buffer and sequentially interpreted therefrom by the CPU.
When off-line, data in the receive buffer is not interpreted. Conventionally, when the printer is off-line data can still be received from the host computer and sequentially stored to the receive buffer. The CPU, however, interprets only real-time commands and does not interpret data in the receive buffer when off-line.
This means that the receive buffer can become full (meaning that there is either very little or no space left to store more data) when a large volume of data, such as from a bit image, is received from the host when the printer is off-line. The communication interface of the printer then enters a busy state, indicating that no more data can be received from the host, and thus prevents any additional data, including real-time commands, from being sent from the host to the printer. The host is then unable to detect the printer status or recover the printer from recoverable errors.
Referring to FIG. 5, for example, the receive buffer 50 of the printer obviously has a finite capacity, which in this example is shown to be 4096 bytes. The printer indicates a busy state to the host computer whenever a certain specific amount of data is stored to the receive buffer 50. In this example a busy state is indicated when the receive buffer is filled to at least 95% of its capacity (i.e., when 3840 bytes have been stored in this example). If the printer has a print head that prints 640 dots per horizontal line (80 bytes per line), the receive buffer will become full when data sufficient to print 48 dot lines (about 6 mm vertically across the page) has been received (3840/80=48 dot lines).
This means that if bit map print data such as shown in FIG. 6 equivalent to about one typical receipt is received while the printer is off-line, the receive buffer will be filled almost immediately.
If the host computer sends data to the printer via a print spooler and the printer keeps sending a busy signal, the print spooler will eventually generate an error. However, the application that has sent the data to the spooler cannot delete data from the spooler, and the user must therefore directly delete the unprinted data from the spooler.